<?php

namespace App\Http\Model;

use Illuminate\Database\Eloquent\Model;

class Links extends Model
{
    protected $table='blog_links';
    protected $primaryKey='link_id';
    public $timestamps = false;
    protected $guarded=[];

    public function getLink(){
        $cate = $this->orderBy('link_order','asc')->paginate(5);
        return $cate;
    }

    public function getPidCate(){
        $data = $this->where('cate_pid','=',0)->get();
        return $data;
    }
    public function getOneLink($id){
        $data = $this->where('link_id','=',$id)->first();
       return $data;
    }
}
